package com.atguigu.eduorder.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
@author cyt
@create 2020-06-02 16:04
*/
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_pay_log")
public class TPayLog implements Serializable {
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 订单号
     */
    @TableField(value = "order_no")
    private String orderNo;

    /**
     * 支付完成时间
     */
    @TableField(value = "pay_time")
    private Date payTime;

    /**
     * 支付金额（分）
     */
    @TableField(value = "total_fee")
    private BigDecimal totalFee;

    /**
     * 交易流水号
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 交易状态
     */
    @TableField(value = "trade_state")
    private String tradeState;

    /**
     * 支付类型（1：微信 2：支付宝）
     */
    @TableField(value = "pay_type")
    private Byte payType;

    /**
     * 其他属性
     */
    @TableField(value = "attr")
    private String attr;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ORDER_NO = "order_no";

    public static final String COL_PAY_TIME = "pay_time";

    public static final String COL_TOTAL_FEE = "total_fee";

    public static final String COL_TRANSACTION_ID = "transaction_id";

    public static final String COL_TRADE_STATE = "trade_state";

    public static final String COL_PAY_TYPE = "pay_type";

    public static final String COL_ATTR = "attr";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}